﻿using FreeSql.DataAnnotations;
using KrasDD.Attributes;

namespace KrasDD.Models
{

    [JsonObject(MemberSerialization.OptIn), Table(Name = "[innovator].[METHOD]", DisableSyncStructure = false)]
    [ItemType("8F83A1B4C5D6E7F8A9B0C1D2E3F4A5BC", "METHOD")]
    public partial class METHOD : AppBaseEntity
    {

        [JsonProperty, Column( DbType = "char(32)")]
        public string ARAS_UNIQUENESS_HELPER { get; set; }

        [JsonProperty, Column(StringLength = 256)]
        public string COMMENTS { get; set; }

        [JsonProperty, Column(DbType = "bit")]
        public bool CORE { get; set; }

        [JsonProperty, Column(DbType = "char(32)", IsNullable = false)]
        public string EXECUTION_ALLOWED_TO { get; set; } = "2618D6F5A90949BAA7E920D1B04C7EE1";

        [JsonProperty]
        public DateTime? EFFECTIVE_DATE { get; set; }

        [JsonProperty, Column(StringLength = -2)]
        public string METHOD_CODE { get; set; }

        [JsonProperty, Column(StringLength = 64)]
        public string METHOD_LOCATION { get; set; }

        [JsonProperty, Column(StringLength = 64)]
        public string METHOD_TYPE { get; set; } = "JavaScript";

        [JsonProperty, Column(StringLength = 32, IsNullable = false)]
        public string NAME { get; set; }

        [JsonProperty]
        public DateTime? RELEASE_DATE { get; set; }

        [JsonProperty]
        public DateTime? SUPERSEDED_DATE { get; set; }

        [JsonProperty, Column(DbType = "char(32)")]
        public string TEMPLATE { get; set; }


        #region 外键 => 导航属性，OneToMany

        //[Navigate("RELATED_ID")]
        //public virtual List<ACTIVITY_METHOD> ACTIVITY_METHODS { get; set; }

        //[Navigate("RELATED_ID")]
        //public virtual List<ACTIVITY_TEMPLATE_METHOD> ACTIVITY_TEMPLATE_METHODS { get; set; }

        //[Navigate("RELATED_ID")]
        //public virtual List<CLIENT_EVENT> CLIENT_EVENTS { get; set; }

        //[Navigate("RELATED_ID")]
        //public virtual List<COLUMN_EVENT> COLUMN_EVENTS { get; set; }

        //[Navigate("RELATED_ID")]
        //public virtual List<CONFIGURABLE_GRID_EVENT> CONFIGURABLE_GRID_EVENTS { get; set; }

        //[Navigate("RELATED_ID")]
        //public virtual List<CONVERSIONRULEEVENTHANDLER> CONVERSIONRULEEVENTHANDLERS { get; set; }

        //[Navigate("RELATED_ID")]
        //public virtual List<CONVERSIONRULEEVENTTEMPLATE> CONVERSIONRULEEVENTTEMPLATES { get; set; }

        //[Navigate("RELATED_ID")]
        //public virtual List<CONVERSIONTASKEVENTHANDLER> CONVERSIONTASKEVENTHANDLERS { get; set; }

        //[Navigate("RELATED_ID")]
        //public virtual List<CUI_CONTROLEVENTHANDLER> CUI_CONTROLEVENTHANDLERS { get; set; }

        //[Navigate("RELATED_ID")]
        //public virtual List<CWS_METHODREFERENCE> CWS_METHODREFERENCES { get; set; }

        //[Navigate("RELATED_ID")]
        //public virtual List<FIELD_EVENT> FIELD_EVENTS { get; set; }

        //[Navigate("RELATED_ID")]
        //public virtual List<FORM_EVENT> FORM_EVENTS { get; set; }

        //[Navigate("RELATED_ID")]
        //public virtual List<GRID_EVENT> GRID_EVENTS { get; set; }

        //[Navigate("RELATED_ID")]
        //public virtual List<QRY_QUERYDEFINITIONEVENT> QRY_QUERYDEFINITIONEVENTS { get; set; }

        //[Navigate("RELATED_ID")]
        //public virtual List<RELATIONSHIP_GRID_EVENT> RELATIONSHIP_GRID_EVENTS { get; set; }

        //[Navigate("RELATED_ID")]
        //public virtual List<SERVER_EVENT> SERVER_EVENTS { get; set; }

        //[Navigate("RELATED_ID")]
        //public virtual List<SYSTEMEVENTHANDLER> SYSTEMEVENTHANDLERS { get; set; }

        //[Navigate("RELATED_ID")]
        //public virtual List<WORKFLOW_MAP_PATH_POST> WORKFLOW_MAP_PATH_POSTS { get; set; }

        //[Navigate("RELATED_ID")]
        //public virtual List<WORKFLOW_MAP_PATH_PRE> WORKFLOW_MAP_PATH_PRES { get; set; }

        //[Navigate("RELATED_ID")]
        //public virtual List<WORKFLOW_PROCESS_PATH_POST> WORKFLOW_PROCESS_PATH_POSTS { get; set; }

        //[Navigate("RELATED_ID")]
        //public virtual List<WORKFLOW_PROCESS_PATH_PRE> WORKFLOW_PROCESS_PATH_PRES { get; set; }

        #endregion
    }

}
